package com.xinqi.modules.chat.chat.group.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.chat.chat.group.domain.ChatGroupEntity;
import com.xinqi.modules.chat.chat.group.dto.req.ChatGroupCreateDTO;
import com.xinqi.modules.chat.chat.group.dto.req.ChatGroupUpdateDTO;
import com.xinqi.modules.chat.chat.group.dto.rsp.ChatGroupAdminResultDTO;
import com.xinqi.modules.chat.chat.group.dto.rsp.ChatGroupResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 群组表转换
 *
 * @author: system
 * @date: 2023/01/12
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class ChatGroupConvert {

    public abstract ChatGroupEntity create(ChatGroupCreateDTO s);

    public abstract ChatGroupEntity update(ChatGroupUpdateDTO s, @MappingTarget ChatGroupEntity t);

    public abstract ChatGroupEntity update(ChatGroupUpdateDTO s);

    public abstract ChatGroupResultDTO convert(ChatGroupEntity s);

    public abstract ChatGroupEntity convert(ChatGroupResultDTO s);

    public abstract ChatGroupAdminResultDTO convertAdmin(ChatGroupEntity s);
}
